using UnityEngine;

public class EarthQuakeDetectorBall : MonoBehaviour
{
    [SerializeField] float moveSpeed = 5;
    [SerializeField] float moveTime = 1.0f;
    float timer = 0;
    bool startedMove;
    void Update()
    {
        if (!startedMove) return;
        if (timer >= moveTime) enabled = false;

        timer += Time.deltaTime;
        transform.position += transform.up * moveSpeed * Time.deltaTime;
    }

    public void StartMoving()
    {
        startedMove = true;
    }
}
